package jwr;

import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.JTextField;

public class JTFandJTA extends JFrame implements ActionListener{
	private JTextField jtf;
	private JTextArea jta;
	
	public JTFandJTA() {
		jtf = new JTextField(20);
		jta = new JTextArea(7,20);
		Container ct = getContentPane();
		ct.setLayout(new FlowLayout());
		ct.add(jtf);
		ct.add(jta);
		jtf.addActionListener(this);
	}
	@Override
	public void actionPerformed(ActionEvent e) {
		jta.append(e.getActionCommand()+"\n ");
	}
}
